package com.lpf.www.dao;

import com.lpf.www.common.entity.Admin;
import com.lpf.www.common.mapper.AdminMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

/**
 * @Author lpf
 * @Date 2021/12/30 下午10:29
 * @ProjectName live-streaming-os
 * @Version 1.0
 * @Description:
 */
@Repository
public class AdminDao {

    private AdminMapper adminMapper;
    @Autowired
    public void setAdminMapper(AdminMapper adminMapper){
        this.adminMapper = adminMapper;
    }

    public Admin selectAdminByUsername(String username){
        return adminMapper.selectAdminByUsername(username);
    }

    public int insertAdmin(Admin admin) {
        return adminMapper.insert(admin);
    }
}
